import request from 'umi-request';
export async function queryRule(params) {
  return request('/api/matMaterialPurchaseRequests/selectByPage', {
    params,
  });
}
export async function removeRule(params) {
  return request(`/api/matMaterialPurchaseRequests/delete/${params.requestId}`, {
    method: 'POST',
    data: {},
  });
}
export async function addRule(params) {
  return request('/api/matMaterialPurchaseRequests/add', {
    method: 'POST',
    data: { ...params },
  });
}
export async function updateRule(params) {
  return request('/api/matMaterialPurchaseRequests/edit', {
    method: 'POST',
    data: { ...params },
  });
}

export async function queryMaterialList(params) {
  return request('/api/matMaterials/selectByPage', {
    params,
  });
}

export async function queryMaterialOne(params) {
  return request('/api/matMaterials/selectByCode', {
    params,
  });
}
